package com.kede.api.stand.controller.store;

import com.kede.api.stand.service.CertiService;
import com.kede.domain.ZhiUserCertifiedDomain;
import com.kede.pojo.ResHttp;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * 独立服务
 *
 * @author 11856
 * @date 2023/06/12
 */
@RestController
@RequestMapping("store")
public class CertifiedController {

    @Resource
    private CertiService certiService;

    /**
     * 提交认证信息
     * @param certifiedDomain
     * @return
     */
    @PostMapping("initCertified")
    public ResHttp storeCertified(@Validated @RequestBody ZhiUserCertifiedDomain certifiedDomain){

        return certiService.storeCertified(certifiedDomain);

    }

    /**
     * 获取门店信息
     * @param storeUserId
     * @return
     */
    @GetMapping("getCertifiInfo")
    public ResHttp getCertifiInfo(Integer storeUserId){
        return certiService.getCertifiInfo(storeUserId);
    }

    /**
     * 获取门店列表
     * @param lng 经度
     * @param lat 维度
     * @return
     */
    @GetMapping("storeList")
    public ResHttp storeList(String lng,String lat,String keyword,Integer type,Integer userId, Integer goodsCount){
        return  certiService.storeList(lng,lat,keyword,type,userId,goodsCount);
    }



}
